package com.fantastic.web.controller.app;

import com.fantastic.common.exception.enums.RespStatusInfo;
import com.fantastic.common.result.ResultData;
import com.fantastic.service.lwf.SetMealInfoService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author .FengYe.
 * @date 2024-06-18
 * 套餐信息
 */
@RestController
@RequestMapping("/app")
public class SetMealController {

    @Resource
    private SetMealInfoService service;

    @GetMapping("getSetMealBymIdApp")
    public ResultData getSetMealBymIdApp(@RequestParam("mId") int mId) {
        return new ResultData(RespStatusInfo.OK, service.getSetMealVoBymId(mId));
    }

    @GetMapping("test")
    public ResultData test(@RequestParam("mId") int mId) {
        return new ResultData(RespStatusInfo.OK, service.test(mId));
    }
}
